import React from 'react'
import {Link} from "react-router-dom";
import './DownloadHint.css'
import logoUrl from '../../res/images/web/download/logo@2x.png'
import cancelBtn from '../../res/images/web/download/取消@2x.png'
import {app_name} from "../../utils/constants";

const DownloadHint = props => {

    const level = props.level


    return <div
        className='download-hint flex-space-between-align-center'
    >
        <div className='flex flex-align-center'>
            <img src={logoUrl} alt='' style={{height: 40, width: 40, marginLeft: '16px',}}/>
            <div style={{marginLeft: '8px',}}>
                <p className='download-hint-big'>{app_name} 客户端</p>
                <p className='download-hint-small'>下载 {app_name} APP 看比分直播领奖励</p>
            </div>

        </div>

        <Link
            to={level === 2 ? '../download' : './download'}
            // to='http://www.youtoball.com:8080/download'
        >
            <div className='download-hint-btn' style={{marginRight: '30px',}}>
            <span>
                立即下载
            </span>
            </div>
        </Link>

        <img
            className='download-hint-cancel'
            alt=''
            src={cancelBtn}
            onClick={() => props.onHidden()}
        />
    </div>
}

export default DownloadHint
